.TH std::initializer_list::end 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::initializer_list::end \- std::initializer_list::end

.SH Synopsis
   const T* end() const noexcept;            \fI(since C++11)\fP
                                             \fI(until C++14)\fP
   constexpr const T* end() const noexcept;  \fI(since C++14)\fP

   Returns a pointer to one past the last element in the initializer list, i.e.
   begin()+size().

   If the initializer list is empty, the values of begin() and end() are unspecified,
   but will be identical.

.SH Parameters

   \fI(none)\fP

.SH Return value

   a pointer to one past the last element in the initializer list

.SH Complexity

   Constant

.SH Example


// Run this code

 #include <numeric>
 #include <initializer_list>

 int main()
 {
     static constexpr auto l = {15, 14};
     static_assert(std::accumulate(l.begin(), l.end(), 13) == 42);
 }

.SH See also

   begin returns a pointer to the first element
         \fI(public member function)\fP
